/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cz.uhk.ppro.response.model;

import java.io.Serializable;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 *
 * @author Martin Zmítko <martin.zmitko@gmail.com>
 */

@Entity
@Table(name="QUESTION")
public class Question extends NamedEntity implements Serializable{

    private String descr;

    @ManyToOne
    private Test test;

    @OneToMany(mappedBy="question")
    private List<Answer> answers;


    public Test getTest() {
        return test;
    }

    public void setTest(Test test) {
        this.test = test;
    }

    public List<Answer> getAnswers() {
        return answers;
    }

    public void setAnswers(List<Answer> answers)
    {
        this.answers = answers;
    }



}
